package com.example.demo.api;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class index {

  private Logger logger = LoggerFactory.getLogger(index.class);

  @GetMapping("index")
  public String hello(@RequestParam(value="name",defaultValue = "xiaowang") String name) {
    logger.info("index-hello-入参：{}",name);
    return "hello"+name;
  }

}